package com.applet.applet_shangcheng.dao;

import com.applet.applet_shangcheng.entity.IntegralGoods;
import com.applet.applet_shangcheng.entity.IntegralMalls;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface IntegralMapper {
    @Select({
            "select id,table_t,sort_id,sort_name from tb_integral_malls where table_t = 'tb_integral_goods'"
    })
    List<IntegralMalls> findAll();

    @Select({
            "select * from tb_integral_goods where sort_id = #{id}"
    })
    List<IntegralGoods> findByClassId(@Param("id") int id);

    @Select({
            "select sort_id from tb_integral_malls where id =#{id}"
    })
    String findByGoodsClassId(int id);
}
